package com.sctvcloud.renhe.beans;

import android.support.annotation.NonNull;

import com.ruihang.generalibrary.ui.util.IListData;
import com.ruihang.generalibrary.utils.IDataDate;
import com.sctvcloud.renhe.ui.util.IListShowData;
import com.sctvcloud.renhe.ui.util.IListShowTypeData;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

import java.io.Serializable;
import java.sql.Date;

/**
 * Created by raoweiwei on 2017/8/9.
 */

@Table(name = "FCollect")
public class FCollect implements IListShowTypeData, Serializable, IDataDate {
    @Column(name = "id", autoGen = false, isId = true)
    private String id;
    @Column(name = "title")
    private String title;
    @Column(name = "pubTime")
    private String pubTime;
    @Column(name = "collectionTime")
    private long collectionTime;
    @Column(name = "img")
    private String img;
    @Column(name = "type")
    private int type;
    @Column(name = "url")
    private String url;
    @Column(name = "newsMediaLength")
    private String newsMediaLength;
    @Column(name = "lable")
    protected String lable;
    @Column(name = "sharedUrl")
    protected String sharedUrl;
    @Column(name = "sub_news_url")
    protected String sub_news_url;
    private Date pubTimeTemp;


    public String getSub_news_url() {
        return sub_news_url;
    }

    public void setSub_news_url(String sub_news_url) {
        this.sub_news_url = sub_news_url;
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String getDataTitle() {
        return title;
    }

    @Override
    public String getDataImg() {
        return img;
    }

    @Override
    public String getDataTag() {
        return null;
    }

    @Override
    public int getDataType() {
        return type;
    }

    @Override
    public int getDataViewType() {
        return type;
    }

    @Override
    public IListData getOwner() {
        return null;
    }

    @Override
    public String getDataId() {
        return id;
    }

    @Override
    public String getTime() {
        return pubTime;
    }

    @Override
    public IListShowData getOwenerData() {
        return null;
    }

    public String getUrl() {
        return url;
    }

    public FCollect setUrl(String url) {
        this.url = url;
        return this;
    }

    public String getTitle() {
        return title;
    }

    public FCollect setTitle(String title) {
        this.title = title;
        return this;
    }

    public FCollect setTime(String pubTtime) {
        this.pubTime = pubTtime;
        return this;
    }

    public String getImg() {
        return img;
    }

    public FCollect setImg(String img) {
        this.img = img;
        return this;
    }

    public FCollect setDataType(int type) {
        this.type = type;
        return this;
    }

    public long getCollectionTime() {
        return collectionTime;
    }

    public String getPubTtime() {
        return pubTime;
    }

    public void setPubTtime(String pubTtime) {
        this.pubTime = pubTtime;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getNewsMediaLength() {
        return newsMediaLength;
    }

    public void setNewsMediaLength(String newsMediaLength) {
        this.newsMediaLength = newsMediaLength;
    }

    public String getLable() {
        return lable;
    }

    public void setLable(String lable) {
        this.lable = lable;
    }

    public void setCollectionTime(long collectionTime) {
        this.collectionTime = collectionTime;
    }

    public String getSharedUrl() {
        return sharedUrl;
    }

    public void setSharedUrl(String sharedUrl) {
        this.sharedUrl = sharedUrl;
    }

    @Override
    public String getResourceType() {
        return null;
    }

    @Override
    public Date getDataDate() {
        return pubTimeTemp;
    }

    @Override
    public void setDataDate(Date date) {
    }

    @NonNull
    @Override
    public String getDatePattern() {
        return "yyyy-MM-dd HH:mm:ss";
    }

    @Override
    public String getDateString() {
        return pubTime;
    }
}
